import { fetch } from './api'
// 列表
let _list = () => {
  return fetch(
    'GetShowProjectList'
  )
}
// 详情
let _detail = ProjectID => {
  return fetch(
    'GetShowProjectInfo',
    {
      ProjectID
    }
  )
}
// 可推荐项目
let _projects = () => {
  return fetch(
    'GetParentSaleProject'
  )
}
// 查询分期
let _groups = pid => {
  return fetch(
    'GetSonSaleProject',
    {
      PID: pid
    }
  )
}
// 查询销售员
let _salerlist = (uid, pid) => {
  return fetch(
    'GetSaleProjectSaler',
    {
      UnionID: uid,
      PID: pid
    }
  )
}
// 推荐客户
let _recommand = (
  UnionID,
  RealName,
  Phone,
  ErpProjectID,
  StaffID,
  Remark
) => {
  return fetch(
    'InstCustomer',
    {
      UnionID,
      RealName,
      Phone,
      ErpProjectID,
      StaffID,
      Remark
    }
  )
}
export const _signin = ({
  RealName,
  Phone,
  ErpProjectID
}) => fetch(
  'ChangeCustomer',
  {
    RealName,
    Phone,
    ErpProjectID
  })
export {
  _list,
  _detail,
  _projects,
  _groups,
  _salerlist,
  _recommand
}